#!/bin/bash

webResponse=$(curl -s -o /dev/null -w "%{http_code}" -X GET "https://www.mirror.aliyuncs.com")

if [ $webResponse !=  200 ] ; then
      echo "Unable to access external network, please check network configuration";
      exit;
fi

sudo docker-compose down --rmi all
sudo docker-compose build
sudo docker-compose up -d